/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Competente;

import adsreis.com.Beans.ClientesBean;
import java.awt.Toolkit;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Pauroenriki
 */
public class Principal extends javax.swing.JFrame {
Clientes clientes;
    Funcionarios funcionarios;
     Integer Acesso;
     Produtos produtos;
     DefaultTableModel tmAniversariantes = new DefaultTableModel(null, new String []{"Nome", "Aniversário", "Telefone", "Celular", "E-mail"});
     DefaultTableModel tmTrocaOleo = new DefaultTableModel(null, new String []{"Nome", "Próxima Troca de Óleo", "Telefone", "Celular", "E-mail"});
     DefaultTableModel tmTrocaCorreia = new DefaultTableModel(null, new String []{"Nome", "Próxima Troca da Correia Dentada", "Telefone", "Celular", "E-mail"});
     List<ClientesBean> clianiversariantes = new ArrayList<>();
     List<ClientesBean> clianiversariantes1 = new ArrayList<>();
     List<ClientesBean> clianiversariantes2 = new ArrayList<>();
     Orcamentos orcamentos;
     Perdas perdas;
     OS os;
     Entradas entradas;
     RProdutos rprodutos;
     RFaturamento rfaturamento;
     Sobre sobre;
    /**
     * Creates new form Principal
     */
    public Principal() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {
        initComponents();
        Login ff = new Login();
        Acesso = ff.nAcesso;
        setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/Icons/icon.png")));
        
        Nacesso();
    }
    
    
    private void Nacesso(){
        
        switch (Acesso){
            case 0:
                
                mnuRelatorios.setVisible(false);
                mnuCadastros.setVisible(false);
                
            case 1:
                mnuRelatorios.setVisible(false);
                
            case 2:
                mnuRelatorios.setVisible(false);
        }
    }
    private void mostrarOS() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException{
        if(os == null){
            os = new OS();
            os.setVisible(true);
        }else{
            os.setVisible(true);
            os.setState(JFrame.NORMAL);
        }
    }
     private void mostrarSobre() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException{
        if(sobre == null){
            sobre = new Sobre();
            sobre.setVisible(true);
        }else{
            sobre.setVisible(true);
            sobre.setState(JFrame.NORMAL);
        }
    }
    private void mostrarRelatorioProdutos() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException{
        if(rprodutos == null){
            rprodutos = new RProdutos();
            rprodutos.setVisible(true);
        }else{
            rprodutos.setVisible(true);
            rprodutos.setState(JFrame.NORMAL);
        }
        
        
    }
    
    private void mostrarProdutos() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException{
        if(produtos == null){
            produtos = new Produtos();
            produtos.setVisible(true);
        }else{
            produtos.setVisible(true);
            produtos.setState(JFrame.NORMAL);
        }
    }
private void mostrarEntradas() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException{
        if(entradas == null){
            entradas = new Entradas();
            entradas.setVisible(true);
        }else{
            entradas.setVisible(true);
            entradas.setState(JFrame.NORMAL);
        }
    }
    
    private void mostrarOrcamentos() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException{
        if(orcamentos == null){
            orcamentos = new Orcamentos();
            orcamentos.setVisible(true);
        }else{
            orcamentos.setVisible(true);
            orcamentos.setState(JFrame.NORMAL);
        }
    }
    
     private void mostrarFuncionarios() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException{
        if(funcionarios == null){
            funcionarios = new Funcionarios();
            funcionarios.setVisible(true);
        }else{
            funcionarios.setVisible(true);
            funcionarios.setState(JFrame.NORMAL);
        }
    }
    
    private void mostrarClientes() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException{
        if(clientes == null){
            clientes = new Clientes();
            clientes.setVisible(true);
        }else{
            clientes.setVisible(true);
            clientes.setState(JFrame.NORMAL);
        }
    }
    
    private void mostrarPerdas() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException{
        if(perdas == null){
            perdas = new Perdas();
            perdas.setVisible(true);
        }else{
            perdas.setVisible(true);
            perdas.setState(JFrame.NORMAL);
        }
    }
    private void mostrarRFaturamento() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException{
        if(rfaturamento == null){
            rfaturamento = new RFaturamento();
            rfaturamento.setVisible(true);
        }else{
            rfaturamento.setVisible(true);
            rfaturamento.setState(JFrame.NORMAL);
        }
    }
    
   
    
    
    
    
    
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        DAniversariantes = new javax.swing.JDialog();
        jScrollPane2 = new javax.swing.JScrollPane();
        tbAniversariantes1 = new javax.swing.JTable();
        DOleo = new javax.swing.JDialog();
        TrocaOleo = new javax.swing.JScrollPane();
        tbTrocaOleo = new javax.swing.JTable();
        DCorreia = new javax.swing.JDialog();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbTrocaCorreia = new javax.swing.JTable();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        mnuInicio = new javax.swing.JMenu();
        mnuSobre = new javax.swing.JMenuItem();
        mnuSair = new javax.swing.JMenuItem();
        mnuCadastros = new javax.swing.JMenu();
        mnuClientes = new javax.swing.JMenuItem();
        mnuFuncionarios = new javax.swing.JMenuItem();
        mnuProdutos = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();
        mnuEntradas = new javax.swing.JMenuItem();
        mnuPerdas = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        mnuOrcamentos = new javax.swing.JMenuItem();
        mnuOS = new javax.swing.JMenuItem();
        mnuRelatorios = new javax.swing.JMenu();
        mnuFaturaProdutos = new javax.swing.JMenuItem();
        mnuFaturamento = new javax.swing.JMenuItem();

        DAniversariantes.setTitle("ANIVERSARIANTES");
        DAniversariantes.setMinimumSize(new java.awt.Dimension(734, 220));
        DAniversariantes.setType(java.awt.Window.Type.UTILITY);

        tbAniversariantes1.setModel(tmAniversariantes);
        jScrollPane2.setViewportView(tbAniversariantes1);

        javax.swing.GroupLayout DAniversariantesLayout = new javax.swing.GroupLayout(DAniversariantes.getContentPane());
        DAniversariantes.getContentPane().setLayout(DAniversariantesLayout);
        DAniversariantesLayout.setHorizontalGroup(
            DAniversariantesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(DAniversariantesLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 714, Short.MAX_VALUE)
                .addContainerGap())
        );
        DAniversariantesLayout.setVerticalGroup(
            DAniversariantesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(DAniversariantesLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        DOleo.setTitle("PRÓXIMA TROCA DE ÓLEO");
        DOleo.setIconImage(null);
        DOleo.setIconImages(null);
        DOleo.setMinimumSize(new java.awt.Dimension(734, 211));
        DOleo.setType(java.awt.Window.Type.UTILITY);

        tbTrocaOleo.setModel(tmTrocaOleo);
        TrocaOleo.setViewportView(tbTrocaOleo);

        javax.swing.GroupLayout DOleoLayout = new javax.swing.GroupLayout(DOleo.getContentPane());
        DOleo.getContentPane().setLayout(DOleoLayout);
        DOleoLayout.setHorizontalGroup(
            DOleoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(DOleoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TrocaOleo, javax.swing.GroupLayout.DEFAULT_SIZE, 714, Short.MAX_VALUE)
                .addContainerGap())
        );
        DOleoLayout.setVerticalGroup(
            DOleoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(DOleoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(TrocaOleo, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE)
                .addContainerGap())
        );

        DCorreia.setTitle("PRÓXIMA TROCA DA CARREIA DENTADA");
        DCorreia.setIconImage(null);
        DCorreia.setIconImages(null);
        DCorreia.setMinimumSize(new java.awt.Dimension(734, 211));
        DCorreia.setType(java.awt.Window.Type.UTILITY);

        tbTrocaCorreia.setModel(tmTrocaCorreia);
        jScrollPane1.setViewportView(tbTrocaCorreia);

        javax.swing.GroupLayout DCorreiaLayout = new javax.swing.GroupLayout(DCorreia.getContentPane());
        DCorreia.getContentPane().setLayout(DCorreiaLayout);
        DCorreiaLayout.setHorizontalGroup(
            DCorreiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DCorreiaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 714, Short.MAX_VALUE)
                .addContainerGap())
        );
        DCorreiaLayout.setVerticalGroup(
            DCorreiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(DCorreiaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setAutoRequestFocus(false);
        setMinimumSize(new java.awt.Dimension(805, 606));

        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icons/icon3.png"))); // NOI18N

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icons/portao-basculante.png"))); // NOI18N
        jLabel2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

        jMenuBar1.setName(""); // NOI18N

        mnuInicio.setText("Inicio");

        mnuSobre.setText("Sobre");
        mnuSobre.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuSobreActionPerformed(evt);
            }
        });
        mnuInicio.add(mnuSobre);

        mnuSair.setText("Sair");
        mnuSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuSairActionPerformed(evt);
            }
        });
        mnuInicio.add(mnuSair);

        jMenuBar1.add(mnuInicio);

        mnuCadastros.setText("Cadastros");

        mnuClientes.setText("Clientes");
        mnuClientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuClientesActionPerformed(evt);
            }
        });
        mnuCadastros.add(mnuClientes);

        mnuFuncionarios.setText("Funcionarios");
        mnuFuncionarios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuFuncionariosActionPerformed(evt);
            }
        });
        mnuCadastros.add(mnuFuncionarios);

        mnuProdutos.setText("Produtos");
        mnuProdutos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuProdutosActionPerformed(evt);
            }
        });
        mnuCadastros.add(mnuProdutos);

        jMenuBar1.add(mnuCadastros);

        jMenu1.setText("Estoque");

        mnuEntradas.setText("Entradas");
        mnuEntradas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuEntradasActionPerformed(evt);
            }
        });
        jMenu1.add(mnuEntradas);

        mnuPerdas.setText("Perdas");
        mnuPerdas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuPerdasActionPerformed(evt);
            }
        });
        jMenu1.add(mnuPerdas);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Movimento");

        mnuOrcamentos.setText("Orçamentos");
        mnuOrcamentos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuOrcamentosActionPerformed(evt);
            }
        });
        jMenu2.add(mnuOrcamentos);

        mnuOS.setText("Ordem de Serviços");
        mnuOS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuOSActionPerformed(evt);
            }
        });
        jMenu2.add(mnuOS);

        jMenuBar1.add(jMenu2);

        mnuRelatorios.setText("Relatórios");

        mnuFaturaProdutos.setText("Produtos");
        mnuFaturaProdutos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuFaturaProdutosActionPerformed(evt);
            }
        });
        mnuRelatorios.add(mnuFaturaProdutos);

        mnuFaturamento.setText("Faturamento");
        mnuFaturamento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnuFaturamentoActionPerformed(evt);
            }
        });
        mnuRelatorios.add(mnuFaturamento);

        jMenuBar1.add(mnuRelatorios);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 465, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jLabel2)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(73, 73, 73)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 73, Short.MAX_VALUE)
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void mnuClientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuClientesActionPerformed
    try {
        mostrarClientes();
    } catch (ClassNotFoundException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnsupportedLookAndFeelException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    }
    }//GEN-LAST:event_mnuClientesActionPerformed

    private void mnuFuncionariosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuFuncionariosActionPerformed
    try {
        mostrarFuncionarios();
    } catch (ClassNotFoundException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnsupportedLookAndFeelException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    }
    }//GEN-LAST:event_mnuFuncionariosActionPerformed

    private void mnuProdutosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuProdutosActionPerformed
    try {
        mostrarProdutos();
    } catch (ClassNotFoundException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnsupportedLookAndFeelException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    }
    }//GEN-LAST:event_mnuProdutosActionPerformed

    private void mnuOrcamentosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuOrcamentosActionPerformed
    try {
        mostrarOrcamentos();
    } catch (ClassNotFoundException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnsupportedLookAndFeelException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    }
    }//GEN-LAST:event_mnuOrcamentosActionPerformed

    private void mnuOSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuOSActionPerformed
    try {
        mostrarOS();
    } catch (ClassNotFoundException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnsupportedLookAndFeelException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    }
    }//GEN-LAST:event_mnuOSActionPerformed

    private void mnuPerdasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuPerdasActionPerformed
    try {
        mostrarPerdas();
    } catch (ClassNotFoundException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnsupportedLookAndFeelException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    }
    }//GEN-LAST:event_mnuPerdasActionPerformed

    private void mnuEntradasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuEntradasActionPerformed
    try {
        mostrarEntradas();
    } catch (ClassNotFoundException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnsupportedLookAndFeelException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    }
    }//GEN-LAST:event_mnuEntradasActionPerformed

    private void mnuFaturaProdutosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuFaturaProdutosActionPerformed
    try {
        mostrarRelatorioProdutos();
    } catch (ClassNotFoundException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnsupportedLookAndFeelException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    }
    }//GEN-LAST:event_mnuFaturaProdutosActionPerformed

    private void mnuFaturamentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuFaturamentoActionPerformed
    try {
        mostrarRFaturamento();
    } catch (ClassNotFoundException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnsupportedLookAndFeelException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    }
    }//GEN-LAST:event_mnuFaturamentoActionPerformed

    private void mnuSobreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuSobreActionPerformed
    try {
        mostrarSobre();
    } catch (ClassNotFoundException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnsupportedLookAndFeelException ex) {
        Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
    }
    }//GEN-LAST:event_mnuSobreActionPerformed

    private void mnuSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuSairActionPerformed
        System.exit(0);
    }//GEN-LAST:event_mnuSairActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {
                    new Principal().setVisible(true);
                } catch (ClassNotFoundException ex) {
                    Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
                } catch (InstantiationException ex) {
                    Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
                } catch (IllegalAccessException ex) {
                    Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
                } catch (UnsupportedLookAndFeelException ex) {
                    Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JDialog DAniversariantes;
    private javax.swing.JDialog DCorreia;
    private javax.swing.JDialog DOleo;
    private javax.swing.JScrollPane TrocaOleo;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JMenu mnuCadastros;
    private javax.swing.JMenuItem mnuClientes;
    private javax.swing.JMenuItem mnuEntradas;
    private javax.swing.JMenuItem mnuFaturaProdutos;
    private javax.swing.JMenuItem mnuFaturamento;
    private javax.swing.JMenuItem mnuFuncionarios;
    private javax.swing.JMenu mnuInicio;
    private javax.swing.JMenuItem mnuOS;
    private javax.swing.JMenuItem mnuOrcamentos;
    private javax.swing.JMenuItem mnuPerdas;
    private javax.swing.JMenuItem mnuProdutos;
    private javax.swing.JMenu mnuRelatorios;
    private javax.swing.JMenuItem mnuSair;
    private javax.swing.JMenuItem mnuSobre;
    public javax.swing.JTable tbAniversariantes1;
    private javax.swing.JTable tbTrocaCorreia;
    private javax.swing.JTable tbTrocaOleo;
    // End of variables declaration//GEN-END:variables
}
